 // src/setupProxy.js
 const { createProxyMiddleware } = require('http-proxy-middleware');

 module.exports = function(app) {
     app.use(
         '/custom_api',  // 前端请求必须带 /api 前缀
         createProxyMiddleware({
             // target: 'http://172.22.160.246:8080',
             // target: 'http://127.0.0.1:6093',
             target: 'https://www.giwp.org.cn',
             changeOrigin: true,
             pathRewrite: { '^/api': '' },  // 转发时移除 /api
         })
     );
 };
